import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { DatabaseModule } from './database/database.module';
import { DataBaseConfig } from './database/DatabaseConfig';


import { ContentModule } from './Post/Post.module';
import { APP_FILTER, APP_PIPE } from '@nestjs/core';
import { AppPipe } from './Core/app.pipe';
import { AppFilter } from './Core/app.filter';
import { ElasticModule } from './config/elasticseach.module';
import { content, elasticseach } from './config/defaultconfig';


@Module({
    imports: [DatabaseModule.forRoot(DataBaseConfig),ContentModule.forRoot(content),ElasticModule.forRoot(elasticseach)], 
    providers:[
        ,{
            provide:APP_FILTER,
            useClass:AppFilter
        }
    ]
})
export class AppModule {}
